﻿using System;
using System.Collections.Generic;
using System.Text;
using EventUtils;
using UnityEngine;
using Newtonsoft.Json;
using View;
using View.Instant;

namespace ZWFrameWork
{
    public class HttpManager : HttpBase
    {
        public static HttpManager Instance = new HttpManager();

        private List<string> ZhuanpanData = new List<string>();
        //设置或者获取中奖者数据
        public List<string> OnSetTurnData(string str = null, bool clear = false)
        {
            if (string.IsNullOrEmpty(str) == false)
            {
                Debug.LogError("获取中奖者数据:"+str+"="+clear);

                var strsplit = str.Split(",");
                var str1 = strsplit[0].Split(":");
                var str2 = strsplit[1].Split(":");
                var str3 = strsplit[2].Split(":");

                Dictionary<string, string> data = new Dictionary<string, string>();
                string str1_1 = str1[0].Replace("\"", "");
                string str1_2 = str1[1].Replace("\"", "");
                ZhuanpanData.Add(str1_1);
                ZhuanpanData.Add(str1_2);

                string str2_1 = str2[0].Replace("\"", "");
                string str2_2 = str2[1].Replace("\"", "");
                ZhuanpanData.Add(str2_1);
                ZhuanpanData.Add(str2_2);

                string str3_1 = str3[0].Replace("\"", "");
                string str3_2 = str3[1].Replace("\"", "");
                ZhuanpanData.Add(str3_1);
                ZhuanpanData.Add(str3_2);
            }
            else if (clear)
            {
                ZhuanpanData.Clear();
            }
            else
            {
                return ZhuanpanData;
            }

            return null;
        }
    }

    struct Req_User_Pay
    {
        /// <summary>
        ///  充值方式: 1-商城,2-谷歌,3-首充,4-限时充值 5-佣金钱包充值
        /// </summary>
        public long shareID;
        /// <summary>
        ///  用户ID
        /// </summary>
        public long userId;
        /// <summary>
        /// 充值配置id: 不同充值方式的配置id
        /// </summary>
        public long configID;
        /// <summary>
        /// 支付金额
        /// </summary>
        public double amount;
    }

    struct Req_User_Get
    {
        /// <summary>
        ///  第几天的奖励
        /// </summary>
        public long day;
        /// <summary>
        ///  用户ID
        /// </summary>
        public long userID;
        /// <summary>
        /// 记录id
        /// </summary>
        public long recordId;
    }
    /// <summary>
    /// 绑定
    /// </summary>
    struct Req_User_Bind
    {
        /// <summary>
        ///  用户ID
        /// </summary>
        public long userID;
        /// <summary>
        /// 受益人名字
        /// </summary>
        public string beneficiaryName;
        /// <summary>
        /// 受益人邮箱
        /// </summary>
        public string beneficiaryEmail;
        /// <summary>
        /// 受益人手机号码
        /// </summary>
        public string beneficiaryPhoneNo;
        /// <summary>
        /// 受益人账号
        /// </summary>
        public string beneficiaryAccount;
        /// <summary>
        /// 受益人IFSC
        /// </summary>
        public string beneficiaryIFSC;
        ///// <summary>
        ///// 受益人VPA
        ///// </summary>
        //public string beneficiaryVPA;
    }


    struct Req_userid
    {
        public uint userid;
    }
    struct Req_userId_One
    {
        public uint userId;
    }
    struct Req_ShareRewardCollect
    {
        public uint userId;
        public string url;
    }
    struct Req_TreasureFlow
    {
        public uint userID;
        public string queryTimeStart;
        public string queryTimeEnd;
    }
    struct Req_RerferEarn
    {
        public uint userid;
        public int page;
        public int pageSize;
    }
    struct Req_Turntable
    {
        public uint userid;
        public int type;
       
    }

    struct Req_ReadMail
    {
        public uint userid;
        public int mailId;
       
    }
    struct Req_Mailhongbao
    {
        public uint userid;
        public int redPacketId;
    }

    struct Req_WithdrawOrder
    {
        public uint userId;

        public double amount;
    }
    struct Req_userId
    {
        public uint userId;
        public uint type;
    }

    struct SMSPhone
    {
        public string mobile;
        public int type;
    }
    
    struct Req_RechargeDouble
    {
        public uint userId;
        public int activityId;
    }
    
    struct Req_WheelType
    {
        public uint userID;
    }
    struct Req_WheelLotteryDraw
    {
        public uint userID;
        public int wheelType;
    }

    struct ExtensionDetails
    {
        public uint userid;
        public string date;
        public int page;
        public int pageSize;
    }
    struct ExtensionMemberDetails
    {
        public uint userid;
        public string level;
        public int page;
        public int pageSize;
    }

    struct send_ExtensionWithdraw
    {
        public uint userid;
        public int amount;
        public long configId;
    }
    struct send_ExtensionWithdraw2
    {
        public uint userId;
        public int withdrawType;
        public long configId;
    }
    struct send_ExtensionRecord
    {
        public uint userid;
        public int page;
        public int pageSize;
    }
    
}